#ifndef __PALYER_TITLE_H__
#define __PALYER_TITLE_H__

class PacketDecoder;
class PlayerTeam;

class PlayerTitle:public PlayerSlave
{

public:
	PlayerTitle(PlayerId stPlayerId);
	virtual ~PlayerTitle();

	bool addTitle(Int32 csv_id);
	void removeTitle(Int32 csv_id);
	UInt32 getTitleSize();
	bool hasTitle(Int32 csv_id);
	void decodeTitles();
	void encodeTitles();
	void sendTitles();

	void decodeTitle(TitleInfo& info);
	//void sendTitleUpdate(Int32 char_id,Int32 state = TitleInfo::FRIEND_STATE_ONLINE);
	//void popOneTmpTitle();

	TitleInfo* getTitleInfo(Int32 csv_id);
private:
	void decodeTitleFaction(TitleInfo& info);
	std::map<Int32,TitleInfo>	m_arTitles;

};
#pragma pack()
#endif